import java.util.Scanner;

public class Test3 {


    public static void main(String[] args) {

       //标点符号不换位置,
        //I like beijingT
        //beijingT like I
        //根据空格分为一组一组字符串
        //I
        //like
        //beijingT
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        String[]array = str.split(" ");
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = array.length-1; i >= 0; i--) {
            stringBuilder.append(array[i]);
            if(i != 0)
            stringBuilder.append(" ");
        }
        System.out.println(stringBuilder.toString());
    }

}
